package com.dolphin.apidriver.remote;

import com.dolphin.common.dto.OrderInfo;
import com.dolphin.common.dto.ResponseResult;
import com.dolphin.common.request.DriverGrabRequest;
import com.dolphin.common.request.OrderRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("service-order")
public interface ServiceOrderClient {

    @PostMapping("/order/to-pick-up-passenger")
    ResponseResult toPickUpPassenger(@RequestBody OrderRequest orderRequest);

    @PostMapping("/order/arrive-departure")
    ResponseResult arriveDeparture(@RequestBody OrderRequest orderRequest);


    @PostMapping("/order/pick-up-passenger")
    ResponseResult pickUpPassenger(OrderRequest orderRequest);

    @PostMapping("/order/passenger-getoff")
    ResponseResult passengerGetOff(OrderRequest orderRequest);

    @PostMapping("/order/cancel")
    ResponseResult cancel(@RequestParam Long orderId, @RequestParam String identity);

    @PostMapping("/order/push-pay-info")
    ResponseResult pushPayInfo(@RequestBody OrderRequest orderRequest);

    @PostMapping("/order/grab")
    ResponseResult<OrderInfo> drvierGrab(@RequestBody DriverGrabRequest driverGrabRequest);
}
